<?php
/*
 * 战令等级变化记录
 */

namespace App\Models\MainDB\WarOrder;

use Illuminate\Database\Eloquent\Model;

class WarOrderUserLevel extends Model
{
    protected $table = 'ln_war_order_user_level';

    protected $fillable = [
        'id',
        'user_id',
        'war_order_id',//战令赛季id
        'level_from',
        'level_to',
        'cost_gold',
        'type',//1积分升级2购买
        'add_time',
    ];

    public $timestamps = false;

    public function user_data()
    {
        return $this->belongsTo('App\Models\MainDB\UserData', 'user_id', 'user_id');
    }
    public function war_order()
    {
        return $this->belongsTo('App\Models\MainDB\WarOrder\WarOrder', 'war_order_id', 'id');
    }
}
